package org.rasterfun.language2

/**
 * 
 * 
 * @author Hans Haggstrom
 */
/*
  Generate an unique named class for each separate block that is created.
  The class has a calculateResult method, as well as a companion object / static fields with metadata constants.
  It also has an invoke method, that takes a map of parameters (name -> value, or number -> value) (name overrides numerical placement?)
  (instead of a map an indexed array or something might be used?  Or instead of identifiers number might be used?)
  The invoke method returns the result of calculateResult - it's type should be calculated / inferred correctly.

  The classes all extend a common interface, that provides a general getter (and setter?), to allow programmatical access to them.

  Treat extensions as class extensions?

  Make sure referenced variables are found in scope, if not throw compile error.

  Lists are classes that implement the generic interface and wrap a list or array (or they could directly be lists / arrays)




 */
class LanguageCompiler {
/*
  def generateCode( expression : Expression ) : String = {

      val s = new StringBuilder()
      val context = new RootContext()

      // TODO: add accepted/automatic imports

      s append "// start\n  "

      expression.generateCode( context, s )

      s append "// end\n  "

      s.toString()
  }


*/
}